<template>
  <div>
    <ul>
      <li v-for="item in compData.data" :key="item.createTime">{{item.username}}在{{ formatTime(item.createTime) }}关注了您</li>
    </ul>
  </div>
</template>

<script setup>
import { onMounted, reactive } from 'vue'
import { useStore } from 'vuex'
import { http } from '../../utils/http'
import { formatTime } from '../../utils/commonUtils/formatTime'
const store = useStore()
let compData = reactive({data:[]})
onMounted( async () => {
  let res = await http.post('/fans/totalFans',{author: store.state.msg.username})
  compData.data = res.data
})
</script>

<style lang="scss" scoped>
li{
  list-style: none;
}
</style>